home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dr.bub / 96000.lha / 96000 / appb / b113.asm < prev    next >
Assembly Source File  |  1992-04-28  |  1KB  |  26 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7.  ;B.1.13    2nd Order Real Biquad IIR Filter  
  8.  ;  w(n) = x(n) - a1 * w(n-1) - a2 * w(n-2) 
  9.  ;  y(n) = w(n) + b1 * w(n-1) + b2 * w(n-2) 
  10.  ;
  11.  ;  Input sample in d0. 
  12.  ;  X Memory Order - w(n-2), w(n-1) 
  13.  ;  Y Memory Order - a2, a1, b2, b1 
  14.  ;                                                              Program    ICycles
  15.  ;                                                                     Words 
  16.    move                           x:(r0)+,d4.s  y:(r4)+,d6.s  ;    1          1 
  17.    fmpy.s d6,d4,d2                x:(r0)-,d5.s  y:(r4)+,d6.s  ;    1          1 
  18.    fmpy   d6,d5,d2 fsub.s d2,d0.s d5.s,x:(r0)+  y:(r4)+,d6.s  ;    1          1 
  19.    fmpy   d6,d4,d2 fsub.s d2,d0                 y:(r4),d6.s   ;    1          1 
  20.    fmpy   d6,d5,d2 fadd.s d2,d0   d0.s,x:(r0)                 ;    1          1 
  21.                    fadd.s d2,d0                               ;    1          1 
  22.    move                           d0.s,x:output               ;    1          1 
  23.  ;                                                            ;    ---        --- 
  24.  ;                                                        Totals:      7          7 
  25.  ;                                                                (    7          7) 
  26.